package com.buli.blmall.admin.exception;

import com.buli.blmall.admin.exception.error.SmsErrorCode;

/**
 * @author xiang.gao
 * @date 2025/2/20 18:39
 */
public class SmsException extends RuntimeException{

    private int code = 400;
    private String message = "验证失败";

    public SmsException(String message) {
        super(message);
    }

    public SmsException(SmsErrorCode smsErrorCode) {
        this.code = smsErrorCode.getCode();
        this.message = smsErrorCode.getMesage();
    }

    public int getCode() {
        return code;
    }

    @Override
    public String getMessage() {
        return message;
    }

}
